package com.example.poemtest.mine;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;

import com.example.poemtest.R;
import com.example.poemtest.utils.FullScreenUtil;

import java.util.Timer;
import java.util.TimerTask;

/**
 * 检查更新页面
 */
public class UpdateActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FullScreenUtil.getInstance().fullScreen(this,true);
        setContentView(R.layout.activity_update);
        //定时5秒后跳转到检查后的页面
        final Intent itent = new Intent(this, UpdateToActivity.class); //你要转向的Activity
        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                startActivity(itent); //执行
                UpdateActivity.this.overridePendingTransition(0, 0);
            }
        };
        timer.schedule(task, 1000 * 3); //5秒后
    }
}